package com.ulic.customerManApplication.usermodule.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.ulic.customerManApplication.commonmodule.bo.Menu;
import com.ulic.customerManApplication.usermodule.dao.PermissionDao;
import com.ulic.customerManApplication.usermodule.service.PermissionService;
@Component("permissionService")
public class PermissionServiceImpl implements PermissionService {
	private PermissionDao permissionDao;

	public void setUserPermission(String userid, int[] objectids)
			throws Exception {
		permissionDao.setUserPermission(userid, objectids);

	}

	public int[] getUserPermission(String userid) throws Exception {
		return permissionDao.getUserPermission(userid);
	}

	
	public List<Menu> getMenuPermissionList(int userOid) throws Exception {
		return permissionDao.getMenuPermissionList(userOid);
	}

	public Map<String, String> getFuncionPermissionMap(int userOid)
			throws Exception {
		return permissionDao.getFuncionPermissionMap(userOid);
	}


	public int[] getUserPermissionList(int userOid) throws Exception {
		return permissionDao.getUserPermissionList(userOid);
	}
	
	@Resource
	public void setPermissionDao(PermissionDao permissionDao) {
		this.permissionDao = permissionDao;
	}

	@Override
	public List<Menu> getAdminMenuPermissionList() throws Exception {
		return permissionDao.getAdminMenuPermissionList();
	}

	
}
